Skip to content

Mh/full pipeline diffusion adjusted scores#2491

Merged
Jubeku merged 7 commits into
ecmwf:jk/develop/diffusion-full-pipelinefrom
moritzhauschulz:mh/full-pipeline-diffusion-adjusted-scores
Jun 18, 2026
Merged

Mh/full pipeline diffusion adjusted scores#2491
Jubeku merged 7 commits into
ecmwf:jk/develop/diffusion-full-pipelinefrom
moritzhauschulz:mh/full-pipeline-diffusion-adjusted-scores

Conversation

@moritzhauschulz

@moritzhauschulz moritzhauschulz commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

This PR basically does two things:

  1. It fixes the SSR computation. Previously, the member RMSE was used as denominator. I (and Claude) think this should be ensemble RMSE.
  2. It fixes some dead-end ('return None') in score.py

This should probably be reviewed by someone from the eval team (maybe @iluise ?).

With this fix, and the fix in the eval config, I can now produce CRPS, SSR and spread plots and maps (pretty much out of the box).

Issue Number

Is this PR a draft? Mark it as draft.

Checklist before asking for review

  • I have performed a self-review of my code
  • My changes comply with basic sanity checks:
    • I have fixed formatting issues with ./scripts/actions.sh lint
    • I have run unit tests with ./scripts/actions.sh unit-test
    • I have documented my code and I have updated the docstrings.
    • I have added unit tests, if relevant
  • [] I have tried my changes with data and code:
    • I have run the integration tests with ./scripts/actions.sh integration-test
    • (bigger changes) I have run a full training and I have written in the comment the run_id(s): launch-slurm.py --time 60
    • (bigger changes and experiments) I have shared a hegdedoc in the github issue with all the configurations and runs for this experiments
  • I have informed and aligned with people impacted by my change:
    • for config changes: the MatterMost channels and/or a design doc
    • for changes of dependencies: the MatterMost software development channel

@github-actions github-actions Bot added eval anything related to the model evaluation pipeline model Related to model training or definition (not generic infra) labels Jun 11, 2026
@clessig

clessig commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

@moritzhauschulz : can we also open this against develop please.

@moritzhauschulz

Copy link
Copy Markdown
Contributor Author

@clessig PR on develop is here

@moritzhauschulz moritzhauschulz marked this pull request as ready for review June 14, 2026 10:15
@clessig

clessig commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

@clessig PR on develop is here

Thanks!

@MatKbauer MatKbauer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Moritz! I'm currently testing this. When I try to launch a training on this branch with

uv run --offline train --base-config config/config_diffusion_d2048_forecast.yml

I'm getting an error that seems related to empty predictions:

Traceback (most recent call last):
  File "/e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/src/weathergen/run_train.py", line 193, in run_train
    trainer.run(cf, devices)
  File "/e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/src/weathergen/train/trainer.py", line 429, in run
    self.train(mini_epoch)
  File "/e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/src/weathergen/train/trainer.py", line 549, in train
    self.grad_scaler.step(self.optimizer)
  File "/e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/.venv/lib/python3.12/site-packages/torch/amp/grad_scaler.py", line 454, in step
    len(optimizer_state["found_inf_per_device"]) > 0
AssertionError: No inf checks were recorded for this optimizer.
[3] > /e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/.venv/lib/python3.12/site-packages/torch/amp/grad_scaler.py(454)step()
-> len(optimizer_state["found_inf_per_device"]) > 0

This does not happen to me on jk/develop/diffusion-full-pipeline, but in the changed files of this PR, I can't quite see where the problem comes from. @moritzhauschulz, do you have an idea?

@moritzhauschulz

Copy link
Copy Markdown
Contributor Author

Thanks, Moritz! I'm currently testing this. When I try to launch a training on this branch with

uv run --offline train --base-config config/config_diffusion_d2048_forecast.yml

I'm getting an error that seems related to empty predictions:

Traceback (most recent call last):
  File "/e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/src/weathergen/run_train.py", line 193, in run_train
    trainer.run(cf, devices)
  File "/e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/src/weathergen/train/trainer.py", line 429, in run
    self.train(mini_epoch)
  File "/e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/src/weathergen/train/trainer.py", line 549, in train
    self.grad_scaler.step(self.optimizer)
  File "/e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/.venv/lib/python3.12/site-packages/torch/amp/grad_scaler.py", line 454, in step
    len(optimizer_state["found_inf_per_device"]) > 0
AssertionError: No inf checks were recorded for this optimizer.
[3] > /e/project1/e-ext-2025e01-128/karlbauer1/repos/WeatherGenerator/.venv/lib/python3.12/site-packages/torch/amp/grad_scaler.py(454)step()
-> len(optimizer_state["found_inf_per_device"]) > 0

This does not happen to me on jk/develop/diffusion-full-pipeline, but in the changed files of this PR, I can't quite see where the problem comes from. @moritzhauschulz, do you have an idea?

Thanks for taking a look @MatKbauer. This is indeed strange, and I am getting the same. I have seen this error before but I don't recall when... On first glance it seems to be unrelated to my changes (which is why I didn't test the training, whoops). However, I am getting the same currently on jk/develop/diffusion-full-pipeline, so maybe it has to do with some package update that's not compatible?

@moritzhauschulz moritzhauschulz force-pushed the mh/full-pipeline-diffusion-adjusted-scores branch from ad88e05 to a26fded Compare June 18, 2026 08:46
@Jubeku Jubeku merged commit 246f05e into ecmwf:jk/develop/diffusion-full-pipeline Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eval anything related to the model evaluation pipeline model Related to model training or definition (not generic infra)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants